namespace CSharpPro._1013._1020;


//作业一
public class work
{
    public static void BubbleSort(int[] arr)
    {
        int n = arr.Length;
        for (int i = 0; i < n - 1; i++)
        {
            for (int j = 0; j < n - i - 1; j++)
            {
                if (arr[j] > arr[j + 1])
                {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                }
            }
        }
    }
}

//作业二
public class Student
{
    public string Name { get; set; }
    public int Age { get; set; }
    public string StudentId { get; set; }
    public double Score { get; set; }
    public Student(string name, int age, string studentId, double score)
    {
        Name = name;
        Age = age;
        StudentId = studentId;
        Score = score;
    }
    public void DisplayInfo()
    {
        Console.WriteLine($"学生姓名: {Name}");
        Console.WriteLine($"年龄: {Age}");
        Console.WriteLine($"学号: {StudentId}");
        Console.WriteLine($"成绩: {Score}");
        Console.WriteLine("-------------------");
    }
    public bool IsPass()
    {
        return Score >= 60;
    }
}